/**
 * 主页js
 */


//第一部分
if(location.href=="http://sjt.jl.gov.cn/" || location.href=="http://sjt.jl.gov.cn/index.html"){
	
	$("#searchform1 input[name='searchword']").attr("title","请输入要搜索的内容");
	$("#searchform1 input[type='submit']").attr("title","查询");
	
	
	// 总计时器，保证目标加载完毕再执行js（轮播+审计要闻）
	_EsdDynamicTransformationScript.intervalSjt = setInterval(function(){
		
		if( ( $(".focusBox ul.pic a.pic_text:last") != undefined ) 
				&& ( $(".layer .sjyw .slideTxtBox .bd .bdcon:eq(1) a:first") != undefined ) 
				&& ( $(".layer .sjyw .slideTxtBox .bd .bdcon:eq(2) a:last") != undefined )  ){
			clearInterval(_EsdDynamicTransformationScript.intervalSjt);
			
			part_First();
			part_Second();
			
		}
		
	}, 500);
	
	
	var part_Second = function(){
		
	
	//三层
	//各个选项名称									  
	_EsdDynamicTransformationScript.esd1TagNum1 = $(".layer .sjyw .slideTxtBox .hd ul li:eq(0)");
	_EsdDynamicTransformationScript.esd1TagNum2 = $(".layer .sjyw .slideTxtBox .hd ul li:eq(1)");
	_EsdDynamicTransformationScript.esd1TagNum3 = $(".layer .sjyw .slideTxtBox .hd ul li:eq(2)");
	
	//各个选项中的第一个内容
	_EsdDynamicTransformationScript.esd1TagNum1Content1 = $(".layer .sjyw .slideTxtBox .bd .bdcon:eq(0) a:first");
	_EsdDynamicTransformationScript.esd1TagNum2Content1 = $(".layer .sjyw .slideTxtBox .bd .bdcon:eq(1) a:first");
	_EsdDynamicTransformationScript.esd1TagNum3Content1 = $(".layer .sjyw .slideTxtBox .bd .bdcon:eq(2) a:first");
	
	//各个选项中的最后一个内容
	_EsdDynamicTransformationScript.esd1TagNum1ContentN = $(".layer .sjyw .slideTxtBox .bd .bdcon:eq(0) a:last");
	_EsdDynamicTransformationScript.esd1TagNum2ContentN = $(".layer .sjyw .slideTxtBox .bd .bdcon:eq(1) a:last");
	_EsdDynamicTransformationScript.esd1TagNum3ContentN = $(".layer .sjyw .slideTxtBox .bd .bdcon:eq(2) a:last");
	
	//第一块
	_EsdDynamicTransformationScript.esd1TagNum1Content1.focus(function () {
	    $(this).bind("keydown.keydown_s1", function (e) {
	        if (e.shiftKey && e.keyCode == 9) {
	        	_EsdDynamicTransformationScript.esdSJTagCircleNum5.click();
				_EsdDynamicTransformationScript.esdSJTagANum5.focus();
				return false;
	        } else if (e.keyCode == 9) {
	            
	        }
	    });
	});
	_EsdDynamicTransformationScript.esd1TagNum1Content1.blur(function () {
	    $(this).unbind("keydown.keydown_s1");
	});
	
	_EsdDynamicTransformationScript.esd1TagNum1ContentN.focus(function () {
	    $(this).bind("keydown.keydown_e1", function (e) {
	        if (e.shiftKey && e.keyCode == 9) {
	            
	        } else if (e.keyCode == 9) {
	        	_EsdDynamicTransformationScript.esd1TagNum2.mouseover();
	            $(".layer .sjyw .slideTxtBox .bd .bdcon").hide();
	            $(".layer .sjyw .slideTxtBox .bd .bdcon:eq(1)").show();
	            _EsdDynamicTransformationScript.esd1TagNum2Content1.focus();
	            return false;
	        }
	    });
	});
	_EsdDynamicTransformationScript.esd1TagNum1ContentN.blur(function () {
	    $(this).unbind("keydown.keydown_e1");
	});
	
	//第二块
	_EsdDynamicTransformationScript.esd1TagNum2Content1.focus(function () {
	    $(this).bind("keydown.keydown_s2", function (e) {
	        if (e.shiftKey && e.keyCode == 9) {
	        	_EsdDynamicTransformationScript.esd1TagNum1.mouseover();
	            $(".layer .sjyw .slideTxtBox .bd .bdcon").hide();
	            $(".layer .sjyw .slideTxtBox .bd .bdcon:eq(0)").show();
	            _EsdDynamicTransformationScript.esd1TagNum1ContentN.focus();
	            return false;
	        } else if (e.keyCode == 9) {
	        	
	        }
	    });
	});
	_EsdDynamicTransformationScript.esd1TagNum2Content1.blur(function () {
	    $(this).unbind("keydown.keydown_s2");
	});
	
	_EsdDynamicTransformationScript.esd1TagNum2ContentN.focus(function () {
	    $(this).bind("keydown.keydown_e2", function (e) {
	        if (e.shiftKey && e.keyCode == 9) {
	            
	        } else if (e.keyCode == 9) {
	        	_EsdDynamicTransformationScript.esd1TagNum3.mouseover();
	            $(".layer .sjyw .slideTxtBox .bd .bdcon").hide();
	            $(".layer .sjyw .slideTxtBox .bd .bdcon:eq(2)").show();
	            _EsdDynamicTransformationScript.esd1TagNum3Content1.focus();
	            return false;
	        }
	    });
	});
	_EsdDynamicTransformationScript.esd1TagNum2ContentN.blur(function () {
	    $(this).unbind("keydown.keydown_e2");
	});
	
	//第三块
	_EsdDynamicTransformationScript.esd1TagNum3Content1.focus(function () {
	    $(this).bind("keydown.keydown_s3", function (e) {
	        if (e.shiftKey && e.keyCode == 9) {
	        	_EsdDynamicTransformationScript.esd1TagNum2.mouseover();
	            $(".layer .sjyw .slideTxtBox .bd .bdcon").hide();
	            $(".layer .sjyw .slideTxtBox .bd .bdcon:eq(1)").show();
	            _EsdDynamicTransformationScript.esd1TagNum2ContentN.focus();
	            return false;
	        } else if (e.keyCode == 9) {
	            
	        }
	    });
	});
	_EsdDynamicTransformationScript.esd1TagNum3Content1.blur(function () {
	    $(this).unbind("keydown.keydown_s3");
	});

	
	}
	
	
}
